package com.stone.im.kafka;

import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class KafkaController {
    private final static String TOPIC_NAME = "test";

//    @Autowired
//    private KafkaTemplate<String, String> kafkaTemplate;
//
//    @RequestMapping("/send")
//    public String send() {
//        String msg = "hello";
//        kafkaTemplate.send(TOPIC_NAME, "key", msg);
//
//        return String.format("消息 %s 发送成功！", msg);
//    }
}
